<style>
table
{ text-align: center;
font-family: Verdana;
font-weight: normal;
font-size: 11px;
color: #404040;
width: 100%;
background-color: #fafafa;
border-collapse: collapse;
border-spacing: 0px;
}
.warning{
	background-color: #ffa500;
}
.fatal{
	background-color: red;
}
</style>
<?php

/**
 * @author Martin Pernica
 * @copyright 2009
 */
 echo "<h2>".Lang::getBackGlobal('status_title')."</h2>\n<br />";
function file_perms($file, $octal = false)
{
    if(!file_exists($file)) return false;

    $perms = fileperms($file);

    $cut = $octal ? 2 : 3;

    return substr(decoct($perms), $cut);
}

$config = file_perms('../config.php');
$env = file_perms('../env.php');
$gd = gd_info();
$config_color = ($config != '644' || $config != '664') ? 'red' : '#adff2f';
$env_color = ($env != '644' || $config != '664') ? 'red' : '#adff2f';

echo "<table>\n<tr><td>VisionCMS</td><td>".VERSION."</td></tr>\n";
echo "<tr style=\"background-color: ".$config_color."\"><td>config.php</td><td>".$config."</td></tr>";
echo "<tr style=\"background-color: ".$env_color."\"><td>env.php</td><td>".$env."</td></tr>";
echo "<tr><td>GD Library</td><td>".$gd['GD Version']."</td></tr>";
echo "<tr><td>PHP version</td><td>".phpversion()."</td></tr>";
echo "<tr><td>PHP memory limit</td><td>".ini_get('memory_limit')."</td></tr>";
echo "<tr><td>PHP register globals</td><td>".(bool)ini_get('register_globals')."</td></tr>";
echo "</table>";


?>